| 程序包 | 说明 |
|---|---|
| net.posprinter.asynncTask | |
| net.posprinter.posprinterface | |
| net.posprinter.service |
| 限定符和类型 | 字段和说明 |
|---|---|
(专用程序包) UiExecute |
PosAsynncTask.execute |
| 构造器和说明 |
|---|
PosAsynncTask(UiExecute execute,
BackgroundInit init) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
IMyBinder.acceptdatafromprinter(UiExecute execute)
开启一条线程来接收打印机发送的数据,并将数据存储在一个size为500的环形队列缓存区
|
void |
IMyBinder.checkLinkedState(UiExecute execute)
检测app与打印机的连接状态
|
void |
IMyBinder.connectBtPort(java.lang.String bluetoothID,
UiExecute execute)
连接蓝牙端口
|
void |
IMyBinder.connectNetPort(java.lang.String ethernetIP,
int ethernetPort,
UiExecute execute)
连接网络端口
|
void |
IMyBinder.connectUsbPort(Context context,
java.lang.String bluetoothID,
UiExecute execute)
连接USB端口
|
void |
IMyBinder.disconnectCurrentPort(UiExecute execute)
断开当前端口,在不需要连接打印机操作或退出应用时调用此方法,断开连接,释放内存,减轻系统负荷
|
void |
IMyBinder.write(byte[] data,
UiExecute execute)
处理好的数据发送给打印机
|
void |
IMyBinder.writeDataByYouself(UiExecute execute,
ProcessData processData)
可以自己实现ProcessData接口方法,来调用工具类的指令调配方法发送自定义的指令集合,适合在此接口实现耗时的数据处理操作
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
PosprinterService.MyBinder.acceptdatafromprinter(UiExecute execute) |
void |
PosprinterService.MyBinder.checkLinkedState(UiExecute execute) |
void |
PosprinterService.MyBinder.connectBtPort(java.lang.String bluetoothID,
UiExecute execute) |
void |
PosprinterService.MyBinder.connectNetPort(java.lang.String ethernetIP,
int ethernetPort,
UiExecute execute) |
void |
PosprinterService.MyBinder.connectUsbPort(Context context,
java.lang.String usbPathName,
UiExecute execute) |
void |
PosprinterService.MyBinder.disconnectCurrentPort(UiExecute execute) |
void |
PosprinterService.MyBinder.write(byte[] data,
UiExecute execute) |
void |
PosprinterService.MyBinder.writeDataByYouself(UiExecute execute,
ProcessData processData) |